<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>
<html>
<s:head />
<body>
<script src="/js/jquery.tooltip.min.js" type="text/javascript"></script>
<s:actionerror />
<s:actionmessage />
<s:fielderror />
<br />
<h1>行销活动管理
<div class="f-link"><a href="add.do">新增</a></div>
</h1>
<div class="data-form">
<s:form action="list.do" method="post">
	<b>活动类型：</b>
	<select id="cTypeParam" name="campaignTypeParam">
		<option value="">== 请选择 ==</option>
		<option value="01">满额送积分</option>
		<option value="02">满额送折价券</option>
		<option value="03">满额直减</option>
		<option value="04">积分加倍送</option>
		<option value="05">加价购（搭售）</option>
		<option value="06">免运费</option>
		<option value="07">n 选 m</option>
		<option value="08">红配录</option>
		<option value="09">组合商品</option>
		<option value="10">赠品</option>
		<option value="11">加一元送一件</option>
		<option value="12">第二件n折</option>
		<option value="13">买 n 送一</option>
	</select>
	<br>
	<b>活动状态：</b>
	<select id="cStatusParam" name="campaignStatusParam">
		<option value="">== 请选择 ==</option>
		<option value="CLOSED">已结束</option>
		<option value="ONAIR">进行中</option>
		<option value="READY">未开始</option>
	</select>
	<br>	
	<b>适用时机：</b>
	<select id="dTimeParam" name="displayTimeParam">
		<option value="">== 请选择 ==</option>
		<option value="PRD_PGE">商品页</option>
		<option value="SHP_CRT">购物车</option>
		<option value="CHK_OUT">结帐页</option>
		<option value="ORD_FNH">订单成立后</option>
	</select>	
	<input type="button" value="搜寻" onclick="this.form.submit();" />
</s:form>
</div>

	<table class="tb-1" width="100%">
		<thead>
			<tr>
				<th>#</th>
				<th>行销活动名称</th>
				<th>说明</th>
				<th>活动类型</th>
				<th>适用对象</th>
				<th>显示时机</th>
				<th>活动开始时间</th>
				<th>活动结束时间</th>
				<th>启用否？</th>
			</tr>
		</thead>
		<s:if test="campaignList.size > 0">
		<tbody>
			<c:forEach items="${campaignList}" var="campaign" varStatus="rows_index">
				<tr class="${rows_index.count % 2 == 0 ? 'bg-yl' : ''}">
					<td><a href="view.do?idParam=${campaign.id}" /><fmt:formatNumber
						pattern="0000" value="${campaign.id}" /></a></td>
					<td>${campaign.campaignName}</td>
					<td>${campaign.campaignDesc}</td>
					<td>${campaign.campaignType}</td>
					<td>${campaign.allowMemberRank}</td>
					<td>${campaign.displayTiming}</td>
					<td><fmt:formatDate value="${campaign.startDateTime}"
						pattern="yyyy/MM/dd HH:mm:ss" /></td>
					<td><fmt:formatDate value="${campaign.endDateTime}"
						pattern="yyyy/MM/dd HH:mm:ss" /></td>
					<td><c:if test="${campaign.enable eq 'Y'}">是</c:if><c:if test="${campaign.enable eq 'N'}">否</c:if></td>
				</tr>
			</c:forEach>
		</tbody>
		</s:if>
		<s:else>
			<tbody>
				<tr class="bg-yl"><td colspan="6">查无资料!!</td></tr>
			</tbody>
		</s:else>
	</table>	
	<yaodian100:pageutil link="list.do" pagerObj="${pager}" />
</body>
</html>
